<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    function sum(a, b, c) {
      return a + b + c
    }

    let s1 = sum(1, 2, 3)
    console.log(s1);

    //  柯里化
    function sum2(a) {
      return (b) => {
        return (c) => {
          return a + b + c
        }
      }
    }

    let s2 = sum2(1)(2)(3)
    console.log(s2);

  </script>
</body>

</html>
